/*
 * Created on 2009-9-16
 *
 */
package com.myh.config;
import java.util.*;
import java.io.*;
public class readConfig {
	public String getPara(String fileName,String file_attribute) {
		Properties prop= new Properties();
		try {
		InputStream is = getClass().getResourceAsStream(fileName);
		prop.load(is);
		if(is!=null) is.close();
		}
		catch(Exception e) {
		System.out.println("file="+fileName+" not found  "+e);
		}
	return prop.getProperty(file_attribute);
	}
	public static void main(String[] args) {
		
		System.out.println(new readConfig().getPara("db.property","manager_hostname"));
	
	}

}
